package com.learn.project2.mapper.admin.role;

import com.learn.project2.model.bo.admin.role.RolePermissionsFatherBO;
import com.learn.project2.model.bo.admin.role.RolePermissionsGrandsonBO;
import com.learn.project2.model.bo.admin.role.RolePermissionsSonBO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Classname RoleMapper
 * @Description
 * @author王茁
 * @Date 2022/1/8 17:39
 * com.learn.project2.mapper.admin.role.RoleMapper
 * com/learn/project2/dao/RoleMapper.xml
 */
@Mapper
@Repository
public interface RoleMapper {

    List<RolePermissionsFatherBO> getPermissionsFather(Integer roleId);

    List<RolePermissionsSonBO> getPermissionsSon(@Param("fatherId") Integer fatherId);

    List<RolePermissionsGrandsonBO> getPermissionsGrandson(@Param("sonId") Integer sonId);

    List<String> selectPermissionsGrandsonByEnable(Integer roleId);

    int changeEnableForRolePermissionsGrandson(@Param("api") String api);

    List<String> selectPermissionsGrandsonByEnable2();

    List<String> selectPermissionsGrandsonByEnable3();

    List<String> selectPermissionsGrandsonByEnable4();
}
